home *** CD-ROM | disk | FTP | other *** search
- public class CodexVector extends Codex {
- // $FF: renamed from: v float[]
- private float[] field_0 = new float[3];
-
- public void Scale(float scale, CodexVector op1) {
- this.field_0[0] = op1.GetX() * scale;
- this.field_0[1] = op1.GetY() * scale;
- this.field_0[2] = op1.GetZ() * scale;
- }
-
- public void Scale(CodexVector op1, float scale) {
- this.field_0[0] = op1.GetX() * scale;
- this.field_0[1] = op1.GetY() * scale;
- this.field_0[2] = op1.GetZ() * scale;
- }
-
- public void Scale(float scale, float[] op1) {
- this.field_0[0] = op1[0] * scale;
- this.field_0[1] = op1[1] * scale;
- this.field_0[2] = op1[2] * scale;
- }
-
- public void Scale(float[] op1, float scale) {
- this.field_0[0] = op1[0] * scale;
- this.field_0[1] = op1[1] * scale;
- this.field_0[2] = op1[2] * scale;
- }
-
- public boolean IsZero() {
- return this.field_0[0] == 0.0F && this.field_0[1] == 0.0F && this.field_0[2] == 0.0F;
- }
-
- public void SetXZ(float x, float z) {
- this.field_0[0] = x;
- this.field_0[2] = z;
- }
-
- public void SetXZ(CodexVector op1) {
- this.field_0[0] = op1.GetX();
- this.field_0[2] = op1.GetZ();
- }
-
- public void SetXZ(float[] op1) {
- this.field_0[0] = op1[0];
- this.field_0[2] = op1[2];
- }
-
- public boolean Equals() {
- return this.field_0[0] == 0.0F && this.field_0[1] == 0.0F && this.field_0[2] == 0.0F;
- }
-
- public void Set() {
- this.field_0[0] = 0.0F;
- this.field_0[1] = 0.0F;
- this.field_0[2] = 0.0F;
- }
-
- public void Set(CodexVector op1) {
- this.field_0[0] = op1.GetX();
- this.field_0[1] = op1.GetY();
- this.field_0[2] = op1.GetZ();
- }
-
- public void Set(float x, float y, float z) {
- this.field_0[0] = x;
- this.field_0[1] = y;
- this.field_0[2] = z;
- }
-
- public void Set(float[] op1) {
- this.field_0[0] = op1[0];
- this.field_0[1] = op1[1];
- this.field_0[2] = op1[2];
- }
-
- public boolean Equals(CodexVector op1) {
- return this.field_0[0] == op1.GetX() && this.field_0[1] == op1.GetY() && this.field_0[2] == op1.GetZ();
- }
-
- public boolean Equals(float x, float y, float z) {
- return this.field_0[0] == x && this.field_0[1] == y && this.field_0[2] == z;
- }
-
- public boolean Equals(float[] farray) {
- return this.field_0[0] == farray[0] && this.field_0[1] == farray[1] && this.field_0[2] == farray[2];
- }
-
- public static boolean Equals(CodexVector op1, CodexVector op2) {
- return op1.GetX() == op2.GetX() && op1.GetY() == op2.GetY() && op1.GetZ() == op2.GetZ();
- }
-
- public static boolean Equals(CodexVector op1, float x, float y, float z) {
- return op1.GetX() == x && op1.GetY() == y && op1.GetZ() == z;
- }
-
- public static boolean Equals(float x, float y, float z, CodexVector op4) {
- return op4.GetX() == x && op4.GetY() == y && op4.GetZ() == z;
- }
-
- public static boolean Equals(CodexVector op1, float[] op2) {
- return op1.GetX() == op2[0] && op1.GetY() == op2[1] && op1.GetZ() == op2[2];
- }
-
- public static boolean Equals(float[] op1, CodexVector op2) {
- return op2.GetX() == op1[0] && op2.GetY() == op1[1] && op2.GetZ() == op1[2];
- }
-
- public static boolean Equals(float x, float y, float z, float[] op4) {
- return x == op4[0] && y == op4[1] && z == op4[2];
- }
-
- public static boolean Equals(float[] op1, float x, float y, float z) {
- return x == op1[0] && y == op1[1] && z == op1[2];
- }
-
- public float GetZ() {
- return this.field_0[2];
- }
-
- public static boolean Equals(float[] op1, float[] op2) {
- return op1[0] == op2[0] && op1[1] == op2[1] && op1[2] == op2[2];
- }
-
- public static boolean Equals(float x, float y, float z, float x2, float y2, float z2) {
- return x == x2 && y == y2 && z == z2;
- }
-
- public float Max() {
- return Math.max(this.field_0[0], Math.max(this.field_0[1], this.field_0[2]));
- }
-
- public static float Max(CodexVector op1) {
- return Math.max(op1.GetX(), Math.max(op1.GetY(), op1.GetZ()));
- }
-
- public static float Max(float x, float y, float z) {
- return Math.max(x, Math.max(y, z));
- }
-
- public static float Max(float[] op1) {
- return Math.max(op1[0], Math.max(op1[1], op1[2]));
- }
-
- public void Cross(CodexVector op1) {
- float v1 = this.field_0[1] * op1.GetZ() - this.field_0[2] * op1.GetY();
- float v2 = this.field_0[2] * op1.GetX() - this.field_0[0] * op1.GetZ();
- float v3 = this.field_0[0] * op1.GetY() - this.field_0[1] * op1.GetX();
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float x, float y, float z) {
- float v1 = this.field_0[1] * z - this.field_0[2] * y;
- float v2 = this.field_0[2] * x - this.field_0[0] * z;
- float v3 = this.field_0[0] * y - this.field_0[1] * x;
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float[] op1) {
- float v1 = this.field_0[1] * op1[2] - this.field_0[2] * op1[1];
- float v2 = this.field_0[2] * op1[0] - this.field_0[0] * op1[2];
- float v3 = this.field_0[0] * op1[1] - this.field_0[1] * op1[0];
- this.Set(v1, v2, v3);
- }
-
- public void Cross(CodexVector op1, CodexVector op2) {
- float v1 = op1.GetY() * op2.GetZ() - op1.GetZ() * op2.GetY();
- float v2 = op1.GetZ() * op2.GetX() - op1.GetX() * op2.GetZ();
- float v3 = op1.GetX() * op2.GetY() - op1.GetY() * op2.GetX();
- this.Set(v1, v2, v3);
- }
-
- public void Cross(CodexVector op1, float x, float y, float z) {
- float v1 = op1.GetY() * z - op1.GetZ() * y;
- float v2 = op1.GetZ() * x - op1.GetX() * z;
- float v3 = op1.GetX() * y - op1.GetY() * x;
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float x, float y, float z, CodexVector op4) {
- float v1 = op4.GetZ() * y - op4.GetY() * z;
- float v2 = op4.GetX() * z - op4.GetZ() * x;
- float v3 = op4.GetY() * x - op4.GetX() * y;
- this.Set(v1, v2, v3);
- }
-
- public void Cross(CodexVector op1, float[] op2) {
- float v1 = op1.GetY() * op2[2] - op1.GetZ() * op2[1];
- float v2 = op1.GetZ() * op2[0] - op1.GetX() * op2[2];
- float v3 = op1.GetX() * op2[1] - op1.GetY() * op2[0];
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float[] op1, CodexVector op2) {
- float v1 = op2.GetZ() * op1[1] - op2.GetY() * op1[2];
- float v2 = op2.GetX() * op1[2] - op2.GetZ() * op1[0];
- float v3 = op2.GetY() * op1[0] - op2.GetX() * op1[1];
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float x, float y, float z, float[] op4) {
- float v1 = y * op4[2] - z * op4[1];
- float v2 = z * op4[0] - x * op4[2];
- float v3 = x * op4[1] - y * op4[0];
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float[] op1, float x, float y, float z) {
- float v1 = z * op1[1] - y * op1[2];
- float v2 = x * op1[2] - z * op1[0];
- float v3 = y * op1[0] - x * op1[1];
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float x, float y, float z, float x2, float y2, float z2) {
- float v1 = y * z2 - z * y2;
- float v2 = z * x2 - x * z2;
- float v3 = x * y2 - y * x2;
- this.Set(v1, v2, v3);
- }
-
- public void Cross(float[] op1, float[] op2) {
- float v1 = op2[2] * op1[1] - op2[1] * op1[2];
- float v2 = op2[0] * op1[2] - op2[2] * op1[0];
- float v3 = op2[1] * op1[0] - op2[0] * op1[1];
- this.Set(v1, v2, v3);
- }
-
- public void SetRandom() {
- this.field_0[0] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
- this.field_0[1] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
- this.field_0[2] = (float)((Math.random() - (double)0.5F) * (double)2.0F);
- }
-
- public String ToString() {
- return "<" + Float.toString(this.field_0[0]) + " / " + Float.toString(this.field_0[1]) + " / " + Float.toString(this.field_0[2]) + ">";
- }
-
- public void SetUnitY() {
- this.field_0[0] = 0.0F;
- this.field_0[1] = 1.0F;
- this.field_0[2] = 0.0F;
- }
-
- public void SetY(float[] op1) {
- this.field_0[1] = op1[1];
- }
-
- public void SetY(float y) {
- this.field_0[1] = y;
- }
-
- public void SetY(CodexVector op1) {
- this.field_0[1] = op1.GetY();
- }
-
- public void SetUnitX() {
- this.field_0[0] = 1.0F;
- this.field_0[1] = 0.0F;
- this.field_0[2] = 0.0F;
- }
-
- public void Add(CodexVector op1) {
- float[] var10000 = this.field_0;
- var10000[0] += op1.GetX();
- var10000 = this.field_0;
- var10000[1] += op1.GetY();
- var10000 = this.field_0;
- var10000[2] += op1.GetZ();
- }
-
- public void Add(float x, float y, float z) {
- float[] var10000 = this.field_0;
- var10000[0] += x;
- var10000 = this.field_0;
- var10000[1] += y;
- var10000 = this.field_0;
- var10000[2] += z;
- }
-
- public void Add(float[] op1) {
- float[] var10000 = this.field_0;
- var10000[0] += op1[0];
- var10000 = this.field_0;
- var10000[1] += op1[1];
- var10000 = this.field_0;
- var10000[2] += op1[2];
- }
-
- public void Add(CodexVector op1, CodexVector op2) {
- this.field_0[0] = op1.GetX() + op2.GetX();
- this.field_0[1] = op1.GetY() + op2.GetY();
- this.field_0[2] = op1.GetZ() + op2.GetZ();
- }
-
- public void Add(CodexVector op1, float x, float y, float z) {
- this.field_0[0] = op1.GetX() + x;
- this.field_0[1] = op1.GetY() + y;
- this.field_0[2] = op1.GetZ() + z;
- }
-
- public void Add(float x, float y, float z, CodexVector op4) {
- this.field_0[0] = op4.GetX() + x;
- this.field_0[1] = op4.GetY() + y;
- this.field_0[2] = op4.GetZ() + z;
- }
-
- public void Add(CodexVector op1, float[] op2) {
- this.field_0[0] = op1.GetX() + op2[0];
- this.field_0[1] = op1.GetY() + op2[1];
- this.field_0[2] = op1.GetZ() + op2[2];
- }
-
- public void Add(float[] op1, CodexVector op2) {
- this.field_0[0] = op2.GetX() + op1[0];
- this.field_0[1] = op2.GetY() + op1[1];
- this.field_0[2] = op2.GetZ() + op1[2];
- }
-
- public void Add(float x, float y, float z, float[] op4) {
- this.field_0[0] = x + op4[0];
- this.field_0[1] = y + op4[1];
- this.field_0[2] = y + op4[2];
- }
-
- public void Add(float[] op1, float x, float y, float z) {
- this.field_0[0] = x + op1[0];
- this.field_0[1] = y + op1[1];
- this.field_0[2] = y + op1[2];
- }
-
- public void Add(float[] op1, float[] op2) {
- this.field_0[0] = op2[0] + op1[0];
- this.field_0[1] = op2[1] + op1[1];
- this.field_0[2] = op2[2] + op1[2];
- }
-
- public void SetX(float x) {
- this.field_0[0] = x;
- }
-
- public void SetX(CodexVector op1) {
- this.field_0[0] = op1.GetX();
- }
-
- public void SetX(float[] op1) {
- this.field_0[0] = op1[0];
- }
-
- public void SetYZ(float y, float z) {
- this.field_0[1] = y;
- this.field_0[2] = z;
- }
-
- public void SetYZ(CodexVector op1) {
- this.field_0[1] = op1.GetY();
- this.field_0[2] = op1.GetZ();
- }
-
- public void SetYZ(float[] op1) {
- this.field_0[1] = op1[1];
- this.field_0[2] = op1[2];
- }
-
- public void Add(float x, float y, float z, float x2, float y2, float z2) {
- this.field_0[0] = x + x2;
- this.field_0[1] = y + y2;
- this.field_0[2] = y + z2;
- }
-
- public void Sub(CodexVector op1) {
- float[] var10000 = this.field_0;
- var10000[0] -= op1.GetX();
- var10000 = this.field_0;
- var10000[1] -= op1.GetY();
- var10000 = this.field_0;
- var10000[2] -= op1.GetZ();
- }
-
- public void Sub(float x, float y, float z) {
- float[] var10000 = this.field_0;
- var10000[0] -= x;
- var10000 = this.field_0;
- var10000[1] -= y;
- var10000 = this.field_0;
- var10000[2] -= z;
- }
-
- public void Neg() {
- this.field_0[0] = -this.field_0[1];
- this.field_0[1] = -this.field_0[0];
- this.field_0[2] = -this.field_0[2];
- }
-
- public void Neg(CodexVector op1) {
- this.field_0[0] = -op1.GetX();
- this.field_0[1] = -op1.GetY();
- this.field_0[2] = -op1.GetZ();
- }
-
- public void Neg(float[] op1) {
- this.field_0[0] = op1[0];
- this.field_0[1] = op1[1];
- this.field_0[2] = op1[2];
- }
-
- public void Sub(float[] op1) {
- float[] var10000 = this.field_0;
- var10000[0] -= op1[0];
- var10000 = this.field_0;
- var10000[1] -= op1[1];
- var10000 = this.field_0;
- var10000[2] -= op1[2];
- }
-
- public void Sub(CodexVector op1, CodexVector op2) {
- this.field_0[0] = op1.GetX() - op2.GetX();
- this.field_0[1] = op1.GetY() - op2.GetY();
- this.field_0[2] = op1.GetZ() - op2.GetZ();
- }
-
- public void Sub(CodexVector op1, float x, float y, float z) {
- this.field_0[0] = op1.GetX() - x;
- this.field_0[1] = op1.GetY() - y;
- this.field_0[2] = op1.GetZ() - z;
- }
-
- public void Sub(float x, float y, float z, CodexVector op4) {
- this.field_0[0] = x - op4.GetX();
- this.field_0[1] = y - op4.GetY();
- this.field_0[2] = z - op4.GetZ();
- }
-
- public void Sub(CodexVector op1, float[] op2) {
- this.field_0[0] = op1.GetX() - op2[0];
- this.field_0[1] = op1.GetY() - op2[1];
- this.field_0[2] = op1.GetZ() - op2[2];
- }
-
- public void Sub(float[] op1, CodexVector op2) {
- this.field_0[0] = op1[0] - op2.GetX();
- this.field_0[1] = op1[1] - op2.GetY();
- this.field_0[2] = op1[2] - op2.GetZ();
- }
-
- public void Sub(float x, float y, float z, float[] op4) {
- this.field_0[0] = x - op4[0];
- this.field_0[1] = y - op4[1];
- this.field_0[2] = y - op4[2];
- }
-
- public void Sub(float[] op1, float x, float y, float z) {
- this.field_0[0] = op1[0] - x;
- this.field_0[1] = op1[1] - y;
- this.field_0[2] = op1[2] - z;
- }
-
- public void Sub(float[] op1, float[] op2) {
- this.field_0[0] = op2[0] - op1[0];
- this.field_0[1] = op2[1] - op1[1];
- this.field_0[2] = op2[2] - op1[2];
- }
-
- public void SetXY(float x, float y) {
- this.field_0[0] = x;
- this.field_0[1] = y;
- }
-
- public void SetXY(CodexVector op1) {
- this.field_0[0] = op1.GetX();
- this.field_0[1] = op1.GetY();
- }
-
- public void SetXY(float[] op1) {
- this.field_0[0] = op1[0];
- this.field_0[1] = op1[1];
- }
-
- public void Sub(float x, float y, float z, float x2, float y2, float z2) {
- this.field_0[0] = x - x2;
- this.field_0[1] = y - y2;
- this.field_0[2] = y - z2;
- }
-
- public void SetUnitZ() {
- this.field_0[0] = 0.0F;
- this.field_0[1] = 0.0F;
- this.field_0[2] = 1.0F;
- }
-
- public float GetY() {
- return this.field_0[1];
- }
-
- public float Dot(CodexVector op1) {
- return this.field_0[0] * op1.GetX() + this.field_0[1] * op1.GetY() + this.field_0[2] * op1.GetZ();
- }
-
- public float Dot(float x, float y, float z) {
- return this.field_0[0] * x + this.field_0[1] * y + this.field_0[2] * z;
- }
-
- public float Dot(float[] op1) {
- return this.field_0[0] * op1[0] + this.field_0[1] * op1[1] + this.field_0[2] * op1[2];
- }
-
- public static float Dot(CodexVector op1, CodexVector op2) {
- return op1.GetX() * op2.GetX() + op1.GetY() * op2.GetY() + op1.GetZ() * op2.GetZ();
- }
-
- public float Len() {
- return (float)Math.sqrt((double)(this.field_0[0] * this.field_0[0] + this.field_0[1] * this.field_0[1] + this.field_0[2] * this.field_0[2]));
- }
-
- public static float Len(CodexVector op1) {
- return (float)Math.sqrt((double)(op1.GetX() * op1.GetX() + op1.GetY() * op1.GetY() + op1.GetZ() * op1.GetZ()));
- }
-
- public static float Len(float x, float y, float z) {
- return (float)Math.sqrt((double)(x * x + y * y + z * z));
- }
-
- public static float Len(float[] op1) {
- return (float)Math.sqrt((double)(op1[0] * op1[0] + op1[1] * op1[1] + op1[2] * op1[2]));
- }
-
- public static float Dot(CodexVector op1, float x, float y, float z) {
- return op1.GetX() * x + op1.GetY() * y + op1.GetZ() * z;
- }
-
- public static float Dot(float x, float y, float z, CodexVector op4) {
- return op4.GetX() * x + op4.GetY() * y + op4.GetZ() * z;
- }
-
- public static float Dot(CodexVector op1, float[] op2) {
- return op1.GetX() * op2[0] + op1.GetY() * op2[1] + op1.GetZ() * op2[2];
- }
-
- public static float Dot(float[] op1, CodexVector op2) {
- return op2.GetX() * op1[0] + op2.GetY() * op1[1] + op2.GetZ() * op1[2];
- }
-
- public static float Dot(float x, float y, float z, float[] op4) {
- return x * op4[0] + y * op4[1] + z * op4[2];
- }
-
- public static float Dot(float[] op1, float x, float y, float z) {
- return x * op1[0] + y * op1[1] + z * op1[2];
- }
-
- public static float Dot(float x, float y, float z, float x2, float y2, float z2) {
- return x * x2 + y * y2 + z * z2;
- }
-
- public static float Dot(float[] op1, float[] op2) {
- return op1[0] * op2[0] + op1[1] * op2[1] + op1[2] * op2[2];
- }
-
- public void SetZ(float z) {
- this.field_0[2] = z;
- }
-
- public void SetZ(CodexVector op1) {
- this.field_0[2] = op1.GetZ();
- }
-
- public void SetZ(float[] op1) {
- this.field_0[2] = op1[2];
- }
-
- public float GetX() {
- return this.field_0[0];
- }
-
- public float Normalize() {
- float len = this.Len();
- if ((double)len != (double)0.0F) {
- float oneOverLen = 1.0F / len;
- float[] var10000 = this.field_0;
- var10000[0] *= oneOverLen;
- var10000 = this.field_0;
- var10000[1] *= oneOverLen;
- var10000 = this.field_0;
- var10000[2] *= oneOverLen;
- }
-
- return len;
- }
-
- public float[] AsArray() {
- return this.field_0;
- }
-
- public float Normalize(CodexVector op1) {
- float len = Len(op1);
- if ((double)len != (double)0.0F) {
- float oneOverLen = 1.0F / len;
- this.field_0[0] = op1.GetX() * oneOverLen;
- this.field_0[1] = op1.GetY() * oneOverLen;
- this.field_0[2] = op1.GetZ() * oneOverLen;
- }
-
- return len;
- }
-
- public float Normalize(float x, float y, float z) {
- float len = Len(x, y, z);
- if ((double)len != (double)0.0F) {
- float oneOverLen = 1.0F / len;
- this.field_0[0] = x * oneOverLen;
- this.field_0[1] = y * oneOverLen;
- this.field_0[2] = z * oneOverLen;
- }
-
- return len;
- }
-
- public float Normalize(float[] op1) {
- float len = Len(op1);
- if ((double)len != (double)0.0F) {
- float oneOverLen = 1.0F / len;
- this.field_0[0] = op1[0] * oneOverLen;
- this.field_0[1] = op1[1] * oneOverLen;
- this.field_0[2] = op1[2] * oneOverLen;
- }
-
- return len;
- }
-
- public CodexVector() {
- this.field_0[0] = 0.0F;
- this.field_0[1] = 0.0F;
- this.field_0[2] = 0.0F;
- }
-
- public CodexVector(CodexVector op1) {
- this.field_0[0] = op1.GetX();
- this.field_0[1] = op1.GetY();
- this.field_0[2] = op1.GetZ();
- }
-
- public CodexVector(float x, float y, float z) {
- this.field_0[0] = x;
- this.field_0[1] = y;
- this.field_0[2] = z;
- }
-
- public CodexVector(float[] op1) {
- this.field_0[0] = op1[0];
- this.field_0[1] = op1[1];
- this.field_0[2] = op1[2];
- }
-
- public void Scale(float scale) {
- float[] var10000 = this.field_0;
- var10000[0] *= scale;
- var10000 = this.field_0;
- var10000[1] *= scale;
- var10000 = this.field_0;
- var10000[2] *= scale;
- }
- }
-